#pragma once
#include "include.h"
#include "IMethods.h"

using namespace APIMethods;

namespace Method {

	class NCGM : public IMethods
	{
	public:

		NCGM(shared_ptr<const Matrix> SLAEMatrix, shared_ptr<const Matrix> Preconditioner,
			shared_ptr<const Vector> RightPart, shared_ptr<const Vector> Approximation);

		virtual void nextIteration() override;
		//virtual shared_ptr<Vector> getResult() const override;
		
		~NCGM();
	
	private:
		Vector _preconditionedRightPart;
		Vector _temp_vector;
		Vector _temp_vector_1;

		double _alpha;
		double _beta;
		double mul;

		mutable Vector _p_k_1;
		mutable Vector _p_k;
		mutable Vector _s_k;
		mutable Vector _r_k_1;
		mutable Vector _r_k;
		mutable Vector _z_k;

		Vector _x_k;
	};

}